feat: separate GraphQL types into @launchql/types package#399
Closed
pyramation wants to merge 3 commits into
Closed
feat: separate GraphQL types into @launchql/types package#399pyramation wants to merge 3 commits into
pyramation wants to merge 3 commits into
Conversation
- Create new @launchql/types package (v2.11.0) with GraphQL/Graphile types - Remove postgraphile and graphile-build dependencies from @pgpmjs/types - Move GraphileOptions, ApiOptions, FeatureOptions to @launchql/types - Add EnvOptions and EnvGraphQLOptions types to @pgpmjs/env - Update consumer packages to use @launchql/types for GraphQL types - Ensures pgpm has zero GraphQL dependencies in its dependency chain Packages updated: - @pgpmjs/types: removed graphile deps, kept core PGPM types - @pgpmjs/env: added EnvOptions type for full env var parsing - @launchql/types: new package with LaunchQLOptions, GraphileOptions, etc. - @launchql/server, @launchql/explorer: use LaunchQLOptions - graphile-settings, graphile-test, launchql-test: use @launchql/types Co-Authored-By: Dan Lynch <pyramation@gmail.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Dan Lynch <pyramation@gmail.com>
- Create new @launchql/env package that handles GraphQL env parsing and defaults - Strip GraphQL env vars from @pgpmjs/env (GRAPHILE_*, FEATURES_*, API_*) - Update @pgpmjs/env to return only core PgpmOptions (no GraphQL fields) - Update all LaunchQL consumers to use @launchql/env: - packages/server, explorer, cli - graphile/graphile-settings, graphile-test, graphile-upload-plugin - packages/launchql-test - @launchql/env exports getEnvOptions() that merges core + GraphQL options - Re-exports getNodeEnv and other utilities from @pgpmjs/env for convenience This completes the architectural separation where: - @pgpmjs/types + @pgpmjs/env = core PGPM (zero GraphQL deps) - @launchql/types + @launchql/env = LaunchQL (GraphQL features) Co-Authored-By: Dan Lynch <pyramation@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: separate GraphQL types into @launchql/types package
Summary
This PR achieves complete architectural separation of GraphQL/Graphile-specific code from the core PGPM packages. The goal is to ensure
pgpm(PostgreSQL Package Manager) has zero GraphQL dependencies in its dependency chain.Changes:
@launchql/typespackage (v2.11.0) withGraphileOptions,ApiOptions,GraphileFeatureOptions, andLaunchQLOptions@launchql/envpackage (v2.7.0) that handles GraphQL env parsing and defaultspostgraphileandgraphile-builddependencies from@pgpmjs/typesGRAPHILE_*,FEATURES_*,API_*) from@pgpmjs/env@pgpmjs/envto return only corePgpmOptions(no GraphQL fields)@launchql/env:packages/server,packages/explorer,packages/cligraphile/graphile-settings,graphile/graphile-test,graphile/graphile-upload-pluginpackages/launchql-testArchitecture after this PR:
@pgpmjs/types+@pgpmjs/env= core PGPM (zero GraphQL deps)@launchql/types+@launchql/env= LaunchQL (GraphQL features)Updates since last revision
Completed the full architectural separation by creating
@launchql/envpackage. Previously, GraphQL defaults were added to@pgpmjs/envas a workaround, but this violated the separation goal. Now:@launchql/envwraps@pgpmjs/envand adds GraphQL-specific functionality@pgpmjs/envis now purely core PGPM with no GraphQL conceptsgetEnvOptionsfrom@launchql/envinstead of@pgpmjs/env@launchql/envre-exports utilities likegetNodeEnvfor convenienceReview & Testing Checklist for Human
launchqlGraphqlDefaultsin@launchql/typeshas correct values (simpleInflection: true,oppositeBaseNames: true,postgis: true, etc.)launchql-gentests or start server locally to verify PostGraphile generates correct mutation names (e.g.,deletePostnotdeletePostById)pgpm deployor other pgpm commands and confirm no GraphQL packages are loadedgetEnvOptionsfrom@pgpmjs/envin LaunchQL packages that may have been missedloadConfigSyncresult is cast toPartial<LaunchQLOptions>in@launchql/env/src/merge.ts- verify config files with GraphQL options are handled correctlyRecommended test plan:
pnpm buildto verify TypeScript compilationpnpm testacross the monorepo (especiallylaunchql-gen,graphile-settings,server)pgpmcommands work without pulling in GraphQL dependenciesNotes
@pgpmjs/typesor using@pgpmjs/envfor GraphQL options@launchql/typespackage re-exports all types from@pgpmjs/typesfor convenience@launchql/envpackage re-exports core utilities from@pgpmjs/envfor convenience